package DCAnalyzer;

import java.util.ArrayList;

public class DCElement {

	// Specify the 15 Dublin Core Elements
	private ArrayList<String> contributor, coverage, creator, date,
			description, format, identifier, language, publisher, relation,
			rights, source, subject, title, type;

	public DCElement() {
		this.contributor = new ArrayList<String>();
		this.coverage = new ArrayList<String>();
		this.creator = new ArrayList<String>();
		this.date = new ArrayList<String>();
		this.description = new ArrayList<String>();
		this.format = new ArrayList<String>();
		this.identifier = new ArrayList<String>();
		this.language = new ArrayList<String>();
		this.publisher = new ArrayList<String>();
		this.relation = new ArrayList<String>();
		this.rights = new ArrayList<String>();
		this.source = new ArrayList<String>();
		this.subject = new ArrayList<String>();
		this.title = new ArrayList<String>();
		this.type = new ArrayList<String>();
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "DCElement [contributor=" + contributor + ", coverage="
				+ coverage + ", creator=" + creator + ", date=" + date
				+ ", description=" + description + ", format=" + format
				+ ", identifier=" + identifier + ", language=" + language
				+ ", publisher=" + publisher + ", relation=" + relation
				+ ", rights=" + rights + ", source=" + source + ", subject="
				+ subject + ", title=" + title + ", type=" + type + "]";
	}
	
	
	/**
	 * @return statistics about the element
	 */
	public String stats(){
		return "DC Stats: [contributor=" + contributor.size() + ", coverage="
				+ coverage.size() + ", creator=" + creator.size() + ", date=" + date.size()
				+ ", description=" + description.size() + ", format=" + format.size()
				+ ", identifier=" + identifier.size() + ", language=" + language.size()
				+ ", publisher=" + publisher.size() + ", relation=" + relation.size()
				+ ", rights=" + rights.size() + ", source=" + source.size() + ", subject="
				+ subject.size() + ", title=" + title.size() + ", type=" + type.size() + "]";
	}

	/**
	 * @return the contributor
	 */
	public ArrayList<String> getContributor() {
		return contributor;
	}

	/**
	 * @param contributor
	 *            the contributor to add
	 */
	public void addContributor(String contributor) {
		this.contributor.add(contributor);
	}

	/**
	 * @return the coverage
	 */
	public ArrayList<String> getCoverage() {
		return coverage;
	}

	/**
	 * @param coverage
	 *            the coverage to add
	 */
	public void addCoverage(String coverage) {
		this.coverage.add(coverage);
	}

	/**
	 * @return the creator
	 */
	public ArrayList<String> getCreator() {
		return creator;
	}

	/**
	 * @param creator
	 *            the creator to add
	 */
	public void addCreator(String creator) {
		this.creator.add(creator);
	}

	/**
	 * @return the date
	 */
	public ArrayList<String> getDate() {
		return date;
	}

	/**
	 * @param date
	 *            the date to add
	 */
	public void addDate(String date) {
		this.date.add(date);
	}

	/**
	 * @return the description
	 */
	public ArrayList<String> getDescription() {
		return description;
	}

	/**
	 * @param description
	 *            the description to add
	 */
	public void addDescription(String description) {
		this.description.add(description);
	}

	/**
	 * @return the format
	 */
	public ArrayList<String> getFormat() {
		return format;
	}

	/**
	 * @param format
	 *            the format to add
	 */
	public void addFormat(String format) {
		this.format.add(format);
	}

	/**
	 * @return the identifier
	 */
	public ArrayList<String> getIdentifier() {
		return identifier;
	}

	/**
	 * @param identifier
	 *            the identifier to add
	 */
	public void addIdentifier(String identifier) {
		this.identifier.add(identifier);
	}

	/**
	 * @return the language
	 */
	public ArrayList<String> getLanguage() {
		return language;
	}

	/**
	 * @param language
	 *            the language to add
	 */
	public void addLanguage(String language) {
		this.language.add(language);
	}

	/**
	 * @return the publisher
	 */
	public ArrayList<String> getPublisher() {
		return publisher;
	}

	/**
	 * @param publisher
	 *            the publisher to add
	 */
	public void addPublisher(String publisher) {
		this.publisher.add(publisher);
	}

	/**
	 * @return the relation
	 */
	public ArrayList<String> getRelation() {
		return relation;
	}

	/**
	 * @param relation
	 *            the relation to add
	 */
	public void addRelation(String relation) {
		this.relation.add(relation);
	}

	/**
	 * @return the rights
	 */
	public ArrayList<String> getRights() {
		return rights;
	}

	/**
	 * @param rights
	 *            the rights to add
	 */
	public void addRights(String rights) {
		this.rights.add(rights);
	}

	/**
	 * @return the source
	 */
	public ArrayList<String> getSource() {
		return source;
	}

	/**
	 * @param source
	 *            the source to add
	 */
	public void addSource(String source) {
		this.source.add(source);
	}

	/**
	 * @return the subject
	 */
	public ArrayList<String> getSubject() {
		return subject;
	}

	/**
	 * @param subject
	 *            the subject to add
	 */
	public void addSubject(String subject) {
		this.subject.add(subject);
	}

	/**
	 * @return the title
	 */
	public ArrayList<String> getTitle() {
		return title;
	}

	/**
	 * @param title
	 *            the title to add
	 */
	public void addTitle(String title) {
		this.title.add(title);
	}

	/**
	 * @return the type
	 */
	public ArrayList<String> getType() {
		return type;
	}

	/**
	 * @param type
	 *            the type to add
	 */
	public void addType(String type) {
		this.type.add(type);
	}

}
